package model.conditions;

import metier.GameState;
import metier.Objet;

public class ScoreCondition extends Condition {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4725668433920652495L;
	protected Integer scoreValue;
	
	public ScoreCondition() {
		super();
	}

	public ScoreCondition(Integer scoreValue) {
		super();
		this.scoreValue = scoreValue;
	}



	public Integer getScoreValue() {
		return scoreValue;
	}



	public void setScoreValue(Integer scoreValue) {
		this.scoreValue = scoreValue;
	}



	@Override
	public boolean verify(GameState state, Objet sender) {
		Boolean res = false;
		
		if(state.getScoreValue() >= scoreValue) {
			res = true;
		}
		
		if(!inverse) {
			return res;
		} else {
			return !res;
		}
	}

}
